package com.ruoyi.aliai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.aliai.mapper.FileUploadMapper;
import com.ruoyi.aliai.domain.FileUpload;
import com.ruoyi.aliai.service.IFileUploadService;

/**
 * 微调模型Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-24
 */
@Service
public class FileUploadServiceImpl implements IFileUploadService 
{
    @Autowired
    private FileUploadMapper fileUploadMapper;

    /**
     * 查询微调模型
     * 
     * @param id 微调模型主键
     * @return 微调模型
     */
    @Override
    public FileUpload selectFileUploadById(Long id)
    {
        return fileUploadMapper.selectFileUploadById(id);
    }

    /**
     * 查询微调模型列表
     * 
     * @param fileUpload 微调模型
     * @return 微调模型
     */
    @Override
    public List<FileUpload> selectFileUploadList(FileUpload fileUpload)
    {
        return fileUploadMapper.selectFileUploadList(fileUpload);
    }

    /**
     * 新增微调模型
     * 
     * @param fileUpload 微调模型
     * @return 结果
     */
    @Override
    public int insertFileUpload(FileUpload fileUpload)
    {
        fileUpload.setCreateTime(DateUtils.getNowDate());
        return fileUploadMapper.insertFileUpload(fileUpload);
    }

    /**
     * 修改微调模型
     * 
     * @param fileUpload 微调模型
     * @return 结果
     */
    @Override
    public int updateFileUpload(FileUpload fileUpload)
    {
        fileUpload.setUpdateTime(DateUtils.getNowDate());
        return fileUploadMapper.updateFileUpload(fileUpload);
    }

    /**
     * 批量删除微调模型
     * 
     * @param ids 需要删除的微调模型主键
     * @return 结果
     */
    @Override
    public int deleteFileUploadByIds(Long[] ids)
    {
        return fileUploadMapper.deleteFileUploadByIds(ids);
    }

    /**
     * 删除微调模型信息
     * 
     * @param id 微调模型主键
     * @return 结果
     */
    @Override
    public int deleteFileUploadById(Long id)
    {
        return fileUploadMapper.deleteFileUploadById(id);
    }
}
